home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 February: Tool Chest / Dev.CD Feb 00 TC.toast / pc / what's new? / sample code / graphics 3d / setupgl / error handler.h < prev    next >
Encoding:
Text File  |  1999-12-18  |  3.7 KB  |  90 lines

  1. /*
  2.     File:        Error Handler.h
  3.  
  4.     Contains:    Functions to enable build and destory a GL fullscreen context
  5.  
  6.     Written by:    Geoff Stahl (ggs)
  7.  
  8.     Copyright:    Copyright © 1999 Apple Computer, Inc., All Rights Reserved
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <2>    12/18/99    ggs     Fix headers
  13.          <1>    11/28/99    ggs     Initial add.  Split of just error handling functions.  Need to
  14.                                     add more reporting examples
  15.          <1>    11/11/99    ggs     Initial Add
  16.  
  17.     Disclaimer:    IMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.
  18.                 ("Apple") in consideration of your agreement to the following terms, and your
  19.                 use, installation, modification or redistribution of this Apple software
  20.                 constitutes acceptance of these terms.  If you do not agree with these terms,
  21.                 please do not use, install, modify or redistribute this Apple software.
  22.  
  23.                 In consideration of your agreement to abide by the following terms, and subject
  24.                 to these terms, Apple grants you a personal, non-exclusive license, under Apple’s
  25.                 copyrights in this original Apple software (the "Apple Software"), to use,
  26.                 reproduce, modify and redistribute the Apple Software, with or without
  27.                 modifications, in source and/or binary forms; provided that if you redistribute
  28.                 the Apple Software in its entirety and without modifications, you must retain
  29.                 this notice and the following text and disclaimers in all such redistributions of
  30.                 the Apple Software.  Neither the name, trademarks, service marks or logos of
  31.                 Apple Computer, Inc. may be used to endorse or promote products derived from the
  32.                 Apple Software without specific prior written permission from Apple.  Except as
  33.                 expressly stated in this notice, no other rights or licenses, express or implied,
  34.                 are granted by Apple herein, including but not limited to any patent rights that
  35.                 may be infringed by your derivative works or by other works in which the Apple
  36.                 Software may be incorporated.
  37.  
  38.                 The Apple Software is provided by Apple on an "AS IS" basis.  APPLE MAKES NO
  39.                 WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
  40.                 WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  41.                 PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
  42.                 COMBINATION WITH YOUR PRODUCTS.
  43.  
  44.                 IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
  45.                 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  46.                 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  47.                 ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
  48.                 OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
  49.                 (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
  50.                 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  51.  
  52. */
  53.  
  54.  
  55. // Usage notes: 
  56.  
  57.  
  58.  
  59. // include control --------------------------------------------------
  60.  
  61. #ifndef Error_Handler_h
  62. #define Error_Handler_h
  63.  
  64.  
  65. // includes ---------------------------------------------------------
  66.  
  67. #include <DrawSprocket.h>
  68.  
  69. #include <agl.h>
  70.  
  71.  
  72. // structures (public) -----------------------------------------------
  73.  
  74.  
  75. // public function declarations -------------------------------------
  76.  
  77. // Error reporter, can be set to report however the application desires
  78. void ReportError (char * strError);
  79.  
  80. // Error with numeric code reporter, can be set to report however the application desires
  81. void ReportErrorNum (char * strError, long numError);
  82.  
  83. // Handle reporting of DSp errors, error code is passed through
  84. OSStatus DSpReportError (OSStatus error);
  85.  
  86. // Handle reporting of agl errors, error code is passed through
  87. GLenum aglReportError (void);
  88.  
  89.  
  90. #endif // Error_Handler_h